package com.nacrtstudio.webgiftshop.model.shop.beans;

import java.util.Date;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;

import com.nacrtstudio.webgiftshop.core.beans.BaseBean;
import com.nacrtstudio.webgiftshop.model.shop.Comment;
import com.nacrtstudio.webgiftshop.model.shop.Gift;
import com.nacrtstudio.webgiftshop.model.shop.User;

@Entity
public class CommentBean extends BaseBean implements Comment{
	private Long commentId;
	private User user;
	private Gift gift;
	private Date date = new Date();
	private String text;
	public Long getCommentId() {
		return commentId;
	}
	public void setCommentId(Long commentId) {
		this.commentId = commentId;
	}
	@ManyToOne(targetEntity=UserBean.class)
	public User getUser() {
		return user;
	}
	public void setUser(User user) {
		this.user = user;
	}
	@ManyToOne(targetEntity=GiftBean.class)
	public Gift getGift() {
		return gift;
	}
	public void setGift(Gift gift) {
		this.gift = gift;
	}
	public Date getDate() {
		return date;
	}
	public void setDate(Date date) {
		this.date = date;
	}
	public String getText() {
		return text;
	}
	public void setText(String text) {
		this.text = text;
	}
}
